<div class="admin edit new-goods">

	<?php
	$aRow = json_decode($oRow->data, true);
//	print_r($aRow); exit;
	?>

	<div class="urls">
		<a class="add" href="<?php echo $this->createUrl('/admin/category/viewNewGoods/', array('id' => $oRow->id)); ?>">Добавить в магазин</a>
		<a class="not-new" href="<?php echo $this->createUrl('/admin/category/newGoodsIsNotNew/', array('id' => $oRow->id)); ?>">Не показывать в нових</a>
	</div>
	<h1><span><?php echo $aRow['vendor']; ?></span> <span><?php echo $aRow['title']; ?></span></h1>
	<div class="sku">SKU: <?php echo $aRow['sku']; ?></div>

	<?php if(!empty($aRow['sizes']) && !empty($aRow['sizes_name'])): ?>
	<?php
	$rows = array('sizes' => '', 'counts' => '');
	foreach($aRow['sizes_name'] as $sizeId => $sizeName)
	{
		if(!empty($aRow['sizes'][$sizeId]))
		{
			$rows['sizes'] .= '<td>'. $sizeName .'</td>';
			$rows['counts'] .= '<td>'. $aRow['sizes'][$sizeId] .'</td>';
		}
	}
	?>
	<table class="sizes">
		<tr><th>Размер</th><?php echo $rows['sizes']; ?></tr>
		<tr><th>Количество</th><?php echo $rows['counts']; ?></tr>
	</table>
	<?php endif; ?>

	<div class="content"><?php echo $aRow['description']; ?></div>

	<?php if(!empty($aRow['photos'])): ?>
	<div class="photos">
		<?php foreach($aRow['photos'] as $photo): $photo = strtr($photo, array('4x' => 'MULTIVIEW')) ?>
			<a target="_blank" href="<?php echo $photo; ?>"><img alt="" src="<?php echo $photo; ?>" width="300" /></a>
		<?php endforeach; ?>
	</div>
	<?php endif; ?>

	<?php if(!empty($aRow['video'])): ?>
	<div class="video">
		<iframe src="<?php echo $aRow['video']; ?>" border="0" width="480" height="281"></iframe>
	</div>
	<?php endif; ?>

</div>